|
|
|
|
|
|
|
Figure 13.16
The oblique projection of the point (Px, Py, Pz). |
|
|
|
|
|
|
|
|
Similarly, the distance between the point's Y coordinate and the projection's Y coordinate is S * Pz * Sin(q). Because the point starts with Y coordinate Py, the projection's Y coordinate is Py + S * Pz * Sin(q). Putting these facts together, the equations for the projection's coordinates are: |
|
|
|
 |
|
|
|
|
new_x = old_x + S * -(old_z) * Cos(q)
new_y = old_y + S * -(old_z) * Sin(q)
new_z = 0 |
|
|
|
|
|
|
|
|
You can represent these equations with the transformation matrix: |
|
|
|
|
|
|
|
|
Using this information, you can write a Visual Basic routine to initialize a transformation matrix to represent oblique projection onto the X-Y plane. |
|
|
|
 |
|
|
|
|
' Create a transformation matrix for an oblique
' projection onto the X-Y plane. Public Sub m3ObliqueXY(M() As Single, ByVal S As Single, _
ByVal theta As Single)
m3Identity M()
M(3, 1) = -S * Cos(theta)
M(3, 2) = -S * Sin(theta)
M(3, 3) = 0
End Sub |
|
|
|
|
|